Release 10.1A: OpenEdge Data Management:
SQL Reference
HAVING clause
Allows you to set conditions on the groups returned by the
GROUP BYclause. If theHAVINGclause is used without theGROUP BYclause, the implicit group against which the search condition is evaluated is all the rows returned by theWHEREclause.Syntax
Note: A condition of the
HAVINGclause can compare one aggregate function value with another aggregate function value or a constant. ExampleThe
HAVINGclause in the following example compares the value of an aggregate function
(COUNT (*)) to a constant ( 10 ):
The query returns the customer number and number of orders for all customers who had more than 10 orders before March 31.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |